<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2014. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
<title>Adopting JDT Luna (4.4) mechanisms and APIs</title>
</head>

<body>

<h1>Adopting JDT Luna (4.4) mechanisms and APIs</h1>
<p>
  This section describes changes that are required if you are trying to change
  your 4.3 plug-in to adopt the 4.4 mechanisms and APIs.
</p>

<ol>
	<li><a href="#jls8">AST.JLS8 for Java 8 constructs</a></li>
</ol>

<hr>

<!-- ############################################## -->
<h2>1. <a name="jls8">AST.JLS8 for Java 8 constructs</a></h2>
<p>
A new AST level <code>org.eclipse.jdt.core.dom.AST#JLS8</code> has been added for Java 8 language changes.
Clients of previous AST levels are recommended to adopt the new AST level and add support for the new constructs
(new ASTNode types, and new APIs on existing node types).
</p>
<p>
A few APIs in <code>org.eclipse.jdt.core.dom</code> have been deprecated and will throw an exception
when called on a JLS8 AST:
</p>
<ul>
<li>ArrayType's "componentType" property has been replaced by "elementType" and "dimensions" properties</li>
<li>MethodDeclaration and VariableDeclaration's #setExtraDimensions(int) have been replaced by #extraDimensions(),
	which supports annotated Dimensions</li>
<li>MethodDeclaration#thrownExceptions() has been replaced by #thrownExceptionTypes()</li>
</ul>
<p>
<code>org.eclipse.jdt.core.compiler.ReconcileContext#getAST8()</code> should be used were possible.
</p>
<p>
<code>org.eclipse.jdt.ui.SharedASTProvider#getAST(..)</code> now returns a JLS8 AST.
</p>

<!-- ############################################## -->

</body>
</html>
